Sequential, Algebraic, and RPN Entry

ProCalc enables the use of one of three operation-ordering logics. Sequential ordering evaluates all operations in the order they are entered, Algebraic ordering evaluates operations in the order dictated by standard algebraic rules, and RPN evaluates operations according to the rules of Reverse Polish Notation,.

Sequential Logic

Sequential logic is the simplest of the three, evaluating all operations in the order entered. For example, 1+2*3 is evaluated as (1+2)*3, and the result is 9.

Algebraic Logic

Algebraic ordering evaluates operations in the order dictated by standard algebraic rules, delaying operations as necessary to complete the calculation. Using the above example, 1+2*3 is evaluated as 1+(2*3), and the result in this case is 7. Note that the parenthesis are used internally by ProCalc, you can still use parenthesis in your calculations to modify the order of operations.

The algebraic order used by ProCalc in evaluating expressions is shown below (an operation with a higher precedence automatically completes a preceding operation with a lower precedence):

   1   delta percent
   2   universal power, universal root
   3   multiplication, division, modulus
   4   addition, subtraction
   5   and
   6   or, exclusive or
   7   equals (competes all pending operations)

Reverse Polish Notation

Reverse Polish Notation is a special operating logic used in some HP calculators in which the operands are entered first, separated by [Enter], with the operator following the operands. To calculate the above example in RPN, you would enter 2 [Enter] 3 [ x ] 1 [ + ]. This is equivalent to 1+(2*3) in Sequential mode, or simply 1+2*3 in Algebraic mode. There are many references available if you wish to learn RPN, as it will not be covered here in depth. It is included in ProCalc for those who are proficient in its use, and prefer it to ‘standard’ entry logic.

ProCalc's implementation of RPN is as close to the HP standard as possible. Specialized RPN features such as stack roll and last entry are included, as well as an indicator in the display that shows the number of entries on the stack, and a popup stack display (click and hold the mouse button on the main display to popup the stack history). In RPN mode the [CLX] button clears only the X (display) register, and never effects the rest of the stack. The [CLS] (Clear Stack) button clears the entire stack and, if a variable-sized stack is selected, reduces it to one register (the X, or display register).

ProCalc implements a standard four-register stack, using the RPN-standard X, Y, Z, and T registers. You can select (in Preferences) whether you want ProCalc to use a fixed-sized stack (stack size fixed at four), or a variable sized stack. Using a variable sized stack, when the calculator is first started, or is cleared with [CLS], the stack consists of a single entry, the X, or display register, which is also cleared to zero. As numbers are entered, the stack fills up, and as calculations are performed, the stack may grow or shrink, depending on the calculation. The current stack size is shown in the display as the stack indicator, which replaces the parenthesis level indicator. Since there is always at least one register in the stack (the X register), the indicator shows the status of the Y, Z, and T registers only. One solid bar indicates the Y register contains a value, two solid bars indicate Y and Z contain values, and three bars indicate Y, Z, and T contain values (the stack is full). When the stack drops and the stack is full, the T register is copied down into the Z register, allowing calculations with a constant. Note that once the stack becomes full, it does not shrink, as the copy-down feature prevents that. The only way to clear the stack in this case is with the [CLS] button, or the Clear menu command in the Edit menu, which is the equivalent of [CLS] when in RPN mode.